<?php

class User
{

    function add($Stud_id,$Stud_name,$Stud_sex,$Birth_data,$Entry_data,$Mobile,$Birth_place,$Reserve)
    {
        $pdo = new MyPDO();
        $pdo->insert("INSERT INTO dc_student (stud_id,stud_name,stud_sex,birth_date,entry_date,mobile,birth_place,reserve)
VALUES( \"20090001\",\"张学友\",\"男\",\"1980-10-4 20:41:29\",\"2001-10-1 20:41:29\",\"15173459314\",\"湖南长沙\",\"歌神\");");

        echo "进入用户的添加方法";
    }
    function del($Stud_id)
    {
        $pdo = new MyPDO();
        $pdo->delete("DELETE FROM t_student WHERE Stud_id = $Stud_id");
        echo "进入用户的删除方法";
    }
    function mod($Stud_name,$Mobile,$Stud_id)
    {
        $pdo = new MyPDO();
        $pdo->update("UPDATE t_student SET NAME='{$Stud_name}',age={$Mobile} WHERE id = $Stud_id;");
        echo "进入用户的更改方法";
    }
    function find()
    {
        echo "进入用户的查询方法";
        $pdo = new MyPDO();
        $res = $pdo->select("select * from t_student limit 0,10");
        echo "<pre>";print_r($res);echo "<pre>";
    }
    function __call($name, $arguments)
    {
        die("你调用了一个不存在的方法$name");
    }
}